package com.xsd.xsdhouduan.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xsd.xsdhouduan.entity.School;
import com.xsd.xsdhouduan.mapper.SchoolMapper;
import com.xsd.xsdhouduan.service.SchoolService;
import org.springframework.stereotype.Service;

/**
 * 学校服务实现类
 */
@Service
public class SchoolServiceImpl extends ServiceImpl<SchoolMapper, School> implements SchoolService {
    
    @Override
    public School getByName(String name) {
        LambdaQueryWrapper<School> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(School::getName, name);
        return getOne(wrapper);
    }
}
